﻿ @model SchoolPointe.RelatedContent.ViewModels.RelatedContentPartSettingsViewModel
      

@{ 
    ViewBag.ParentTypeName = Model.ParentTypeName;
    ViewBag.PossibleContentTypes = Model.PossibleContentTypes;
    Style.Require("jQueryUI_MultiSelect");
    Script.Require("RelatedContentSettings");    
}

<div id="related-content-relationships">
    @for (int i = 0; i < Model.Relationships.Count; i++) {
        @Html.EditorFor(m => m.Relationships[i])
    }
</div>
<button class="primaryAction" id="butAddNewRelationship">Add New Relationship</button>
<div id="related-content-new-template" style="display:none;">
    @{ var template = new List<SchoolPointe.RelatedContent.Models.RelatedContentRelationship> { new SchoolPointe.RelatedContent.Models.RelatedContentRelationship() }; }
    @for (int i = 0; i < template.Count; i++)
    {
        @Html.EditorFor(m => template[i])
    }        
</div>

<style type="text/css">
    #related-content-relationships fieldset { background-color:#eee; padding:20px; margin: 10px 0; }
</style>